package com.ay7.enums;

import lombok.Getter;

/**
 * 结果枚举类
 * Created by wenjul
 * on 18/3/26 0026 20:34
 */
@Getter
public enum ResultEnum implements CodeEnum{


    PRODUCT_NOT_EXIST(100, "商品不存在"),
    PRODUCT_STOCK_ERROR(101,"商品库存不够"),
    PRODUCT_STATUS_ERROR(102, "商品状态不正确"),


    ORDER_NOT_EXIST(200,"订单不存在"),
    ORDER_DETAIL_NOT_EXIST(201,"订单详情不存在"),
    ORDER_STATUS_ERROR(202,"订单状态不正确"),
    ORDER_UPDATE_FAIL(203,"订单状态更新失败"),
    ORDER_DETAIL_EMPTY(204,"订单详情为空"),
    ORDER_PAY_STATUS_ERROR(205,"订单支付状态失败"),
    ORDER_CANCEL_SUCCESS(206, "订单取消成功"),
    ORDER_FINISH_SUCCESS(207,"订单完结成功"),
    ORDER_OWNER_ERROR(208,"该订单不属于当前用户"),

    FARAM_ERROR(10,"参数不正确"),
    CART_EMPTY(11,"购物车为空"),
    WECHAT_MP_ERROR(12,"微信公众号错误"),
    ORDER_NOT_EX(13,"订单不存在"),
    WXPAY_NOTIFY_MONEY_VERIFY_ERROR(14,"微信支付通知验证错误"),
    LOGIN_FAIL(15,"卖家用户不存在"),
    LOGOUT_SUCCESS(16,"卖家用户登出成功");


    private Integer code;

    private String message;

    ResultEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
